package edu.sctu.practice.class02.shilaihong.assign06.two;

import java.awt.*;

/**
 * Created by admin on 2015/12/22.
 */
public class Mycanvas extends Canvas{
    int r;
    Color c;

    public void setColor(Color c){
        this.c=c;
    }

    public void setR(int r){
        this.r=r;
    }

    public void paint(Graphics g){
        g.setColor(c);
        g.fillOval(0,0,2*r,2*r);
    }

    public int getR(){
        return r;
    }
}
